# $Id: PKGBUILD 78260 2012-10-17 10:27:30Z allan $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Michal Bozon <michal.bozon__at__gmail.com>

pkgbase=python-yaml
pkgname=(python2-yaml python-yaml)
pkgver=3.10
pkgrel=3
pkgdesc="Python bindings for YAML, using fast libYAML library"
arch=('i686' 'x86_64')
url="http://pyyaml.org"
license=('MIT')
makedepends=('python' 'python2' 'libyaml')
install='python-yaml.install'
source=(http://pyyaml.org/download/pyyaml/PyYAML-$pkgver.tar.gz)
md5sums=('74c94a383886519e9e7b3dd1ee540247')

build() {
  true
}

package_python2-yaml() {
  depends=('python2' 'libyaml')

  cd $srcdir/PyYAML-$pkgver
  python2 setup.py install --prefix=/usr --root=$pkgdir
  install -m644 -D LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
}

package_python-yaml() {
  depends=('python' 'libyaml')

  cd $srcdir/PyYAML-$pkgver
  python setup.py install --prefix=/usr --root=$pkgdir
  install -m644 -D LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
}
